home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Loadstar 154
/
154.d81
/
knights quad
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2022-08-26
|
7KB
|
193 lines
10 dv=peek(186):ifdv<8thendv=8
50 poke53280,0:poke53281,10:poke646,2:poke53272,31
60 :
70 rem title screen
80 :
90 print"[147][172][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][187]";
100 print"[161][146] [161]";
110 print"[161][146][144] [172][187][172][187][172][187][172][187][172][187][172][162][162][187][172][187][172][187][172][162][162][187][172][162][162][187][172][187][160] [161]";
120 print"[161][146][144] [161][146][161][161][146][161][161][188][161][146][161][161][146][161][161][146][161][188][190][161][146][161][161][146][161] [161][146][161] [161][146][161][188][190] [161] [161]";
130 print"[161][146][144] [161][188][190][146][190][161] [146][161][161][146][161][161][146][161][162][187][161][188][190][146][161] [161][146][161] [161][188][146][162][187] [161]";
140 print"[161][146][144] [161][146][161][161][146][161][161][172] [146][161][161][146][161][161][146][161][161][146][161][161][146][161][161][146][161] [161][146][161] [161][146][161] [161]";
150 print"[161][146][144] [161][146][161][161][146][161][161][146][161][161][146][161][161][146][161][161][188][190][146][161][161][146][161][161][146][161] [161][146][161] [161][188][190][146][161] [161]";
160 print"[161][146][144] [172][162][162][187][172][187][172][187][172][162][162][187][172][162][162] [172][162][162][187][172][187][172][187] [172][187] [172][162][162][187] [161]";
170 print"[161][146][144] ";:fori=1to12:print"[161][146][161]";:next:print" [161][146][161] [161][146][161][188][190] [161]";
180 print"[161][146][144] [161][146][161][161][146][161][161][146][161][161][146][161][161][188][190][146][161][161][146][161][161][146][161][161][188][190][146][190][161][146][161][161][146][161] [161][146][161] [161][188][146][162] [160][161]";
190 print"[161][146][144] ";:fori=1to12:print"[161][146][161]";:next:print" [161][146][161] [161][146][161][160] [161]";
200 print"[161][146][144] [161][188][190][188][146][161][188][190][146][161][161][146][161][161][146][161][161][188][190][146][190][161][146][161][161][146][161][161][146][161][161][188][190][146][161][161][188][190][146][161][161][188][190][146][161] [161]";
210 print"[161][146][144] [161]";
220 print"[161][146][144] [176][178][178][174][144][176][174][176][174][176][178][178][174][144][176][178][178][174][176][178][178][174] [161]";
230 print"[161][146] [221][221][173][189][144][221][221][221][221][221][221][173][189][144][221][221][173][189][221][221][173][189] [161]";
240 print"[161][146] [221][221] [144][221][171][179][221][221][171][192] [144][173][177][178][174][173][177][178][174] [161]";
250 print"[161][146] [221][221][176][174][144][221][221][221][221][221][221][176][174][144][176][174][221][221][176][174][221][221] [161]";
260 print"[161][146] [173][177][177][189][144][173][189][173][189][173][177][177][189][144][173][177][177][189][173][177][177][189] [161]";
270 print"[161][146][144] [176][178][178][174][176][174][176][174][144][176][178][178][174][176][178][178][174][144][176][174] [176][178][178][174][144] [161]";
280 print"[161][146][144] [221][221][221][221][221][221][221][221][144][173][189][221][221][173][189][221][221][144][221][221] [221][221][173][189][144] [161]";
290 print"[161][146][144] [221][171][177][189][221][221][221][221][144][176][178][177][189][176][178][177][189][144][221][221] [221][171][192] [144] [161]";
300 print"[161][146][144] [221][221] [221][221][221][221][144][221][221][176][174][221][221][176][174][144][221][221][176][174][221][221][176][174][144] [161]";
310 print"[161][146][144] [173][189] [173][177][177][189][144][173][177][177][189][173][177][177][189][144][173][177][177][189][173][177][177][189][144] [161]";
320 print"[161][146] [161]";
330 print"[188][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][146]";:poke2023,126
340 tq=0:poke53370,0
342 tq=tq+1:geta$:ifa$=""andtq<100then342
344 poke53371,0
350 poke53280,0:poke53281,10:gosub1400
352 dv=peek(186):ifdv<8thendv=8
360 :
370 rem instruction screen
380 :
390 print"[147][144] [212]o begin, two white knights occupy the
400 [153]" upper corners while two black knights
410 print" occupy the lower corners of a four by
420 [153]" three chessboard grid.
430 print" [176][192][192][192][192][178][192][192][192][192][178][192][192][192][192][174] [212]he goal is to finish
440 [153]" (NULL) (NULL) (NULL) (NULL) the game with the two
450 print" [221] [221] [221] [221] black knights in the
460 [153]" (NULL) (NULL) (NULL) (NULL) upper corners and the
470 print" [171][192][192][192][192][219][192][192][192][192][219][192][192][192][192][179] two white knights in
480 [153]" (NULL) (NULL) (NULL) (NULL) the lower corners.
490 print" [221] [221] [221] [221]
500 [153]" (NULL) (NULL) (NULL) (NULL) (NULL)he four knights move
510 print" [171][192][192][192][192][219][192][192][192][192][219][192][192][192][192][179] as in the normal game
520 [153]" (NULL) (NULL) (NULL) (NULL) of chess. (NULL)ocated in
530 print" [221] [221] [221] [221] the center portion of
540 [153]" (NULL) (NULL) (NULL) (NULL) the gameboard are two
550 print" [171][192][192][192][192][219][192][192][192][192][219][192][192][192][192][179] kings who do not move
560 [153]" (NULL) (NULL) (NULL) (NULL) at all.
570 print" [221] [221] [221] [221]
580 [153]" (NULL) (NULL) (NULL) (NULL) (NULL)elect (1) to try the
590 print" [173][192][192][192][192][177][192][192][192][192][177][192][192][192][192][189] puzzle unassisted and
600 [153]" (2) for the computer demonstration. ";
610 [151]s[170]2,44:[151]s[170]3,108:[151]s[170]4,124:[151]s[170]5,108:[151]s[170]6,44:[151]s[170]7,204
620 [151]s[170]8,124:[151]s[170]9,204:[151]s[170]10,84:[151]s[170]11,140:[151]s[170]12,84:[151]s[170]13,172
630 [151]s[170]29,0:[151]s[170]23,0:[151]s[170]21,126
632 [151]204,0:[151]207,0
634 [161]a$:[139]a$[179]"1"[176]a$[177]"2"[167]632
636 cm[178]0:[139]a$[178]"2"[167]cm[178]1
638 [151]s[170]21,0:[151]204,1
640 :
650 [143] set variables
660 :
670 [134] f(20),t(20):m[178]1:mp[178]1089:s$[178]" "
680 [129]i[178]1[164]20:[135]n$:f$[178][200](n$,1):f(i)[178][198](f$)[171]64
690 t$[178][201](n$,1):t(i)[178][198](t$)[171]64:[130]
700 [129]i[178]1[164]10:s(i)[178]0:[130]:s(1)[178]1:s(3)[178]2:s(8)[178]3:s(6)[178]4
710 [129]i[178]1[164]10:[135]x(i),y(i):[130]
720 :
730 [143] gameboard screen
740 :
750 [153]"load";:[151]53281,0:[151]53280,10:[151]646,10
760 [153]"cont (NULL)ress (NULL) to (NULL)uit def wait asc(NULL)(NULL)(NULL) (NULL)(NULL) asc(NULL)(NULL)(NULL) (NULL)(NULL)"
770 [153]" defortantantantan=tantantantan=tantantantan^ "
772 [129]i[178]1[164]3
774 [129]j[178]1[164]3:[153]" def(NULL) defwait(NULL) defwait(NULL) defwait(NULL) ":[130]
790 [153]" def-tantantantan(NULL)tantantantan(NULL)tantantantan< ":[130]
840 [129]j[178]1[164]3:[153]" def(NULL) defwait(NULL) defwait(NULL) defwait(NULL) ":[130]
850 [153]"def /tantantantan>tantantantan>tantantantanexp "
860 [153]" wait"
870 [129]i[178]1[164]5:[153]" wait":[130]
872 [151]214,1:[153]:[153][163]3)"atnpeeklen
874 printtab(3)"[202][196]
876 [153][163]3)"right$val
878 printtab(3)"[200][199][198]
880 p[178]1787:[141]1580:[153]"cont(NULL)ove (NULL)umber:"
890 p[178]1984:[141]1580:[153]"def chr$oal: peek(NULL)atnlen(NULL) on (NULL)(NU